 ///
 /// @file    Condition.h
 /// @author  lemon(haohb13@gmail.com)
 /// @date    2016-03-03 11:24:47
 ///

#ifndef __CONDITION_H__
#define __CONDITION_H__

#include <pthread.h>

class MutexLock;//前向声明

class Condition
{
public:
	Condition(MutexLock & mutex);
	~Condition();

	void wait();
	void notify();
	void notifyAll();

private:
	pthread_cond_t _cond;
	MutexLock & _mutex;
};

#endif
